﻿@using Newtonsoft.Json;
@{

    var productList = ViewBag.list;
    var KV_IMG = "/Upload/Images/fe47d807a30346ef8288d2b428628cc0.jpg";
    var typeName = "";
	var pdtype_name = "";
	var pdtype_remark = "";
    if (productList != null && productList.Count > 0)
    {
        typeName = productList[0].PD_TYPE_NAME+ " | ";
        KV_IMG = productList[0].KV_IMG_URL;
		pdtype_name=productList[0].PD_TYPE_NAME;
		pdtype_remark=productList[0].PD_TYPE_REMARK;

    }
    ViewBag.Title = typeName+"大卫杜夫雪茄";
}

<div class="cigars_detailbox main_cont">
    <div class="page_wrapper"><a class="bread" href="javascript:history.go(-1)">返回</a></div>
    <div id="kv_wp">
        <div class="kv" style="position:relative">
            <a href="javascript:void(0)" style="background-image: url(@KV_IMG)"><img src="@KV_IMG"></a>
        </div>
		<div class="meta">
            <h1 class="title">@pdtype_name</h1>
            <p class="describe">@pdtype_remark</p>
        </div>
    </div>

    <section class="items_box" id="wp">
        @if (productList != null && productList.Count > 0)
        {
            foreach (var item in productList)
            {
                if (string.IsNullOrEmpty(item.PRODUCT_ID_URL))
                {
                    item.PRODUCT_ID_URL = item.PRODUCT_ID;
                }
                if (item.IMG_URL != null && !string.IsNullOrEmpty(item.IMG_URL) && item.IMG_URL != "[]")
                {
                    var arr = JsonConvert.DeserializeObject<List<string>>(item.IMG_URL);
                    <div class="item" href="/product/detail/@item.PRODUCT_ID"><a href="/product/detail/@item.PRODUCT_ID_URL">
                        <img src="@arr[0]">
                        <h2 class="title">@item.PRODUCT_NAME</h2>
                        @if (item.IS_NEW == 1)
                        {<div class="icon_new"></div>
                        }
                    </a></div>
                }
            }
        }
    </section>
</div>
